<?php
   if(!isset($_SESSION)){
     session_start();       
     if(!isset($_SESSION['user_id']) || trim($_SESSION['user_id'])==""){
       Header("Location: ../index.php");       
     }
   }
?>